/* Spelspesifikke stilar som fungerer med Spillsidene.no-layouten */
.game-section {
	text-align: center;
	background-color: rgba(255, 255, 255, 0.1);
	border-radius: 20px;
	padding: 2rem;
	margin: 2rem auto;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	max-width: 600px;
	width: fit-content;
}
/* Overstyr containerstilar når det blir brukt i Spillsidene.no-layout */
.content-table .container {
	background-color: transparent;
	box-shadow: none;
	padding: 0;
}
/* Speltittel-stilar */
h1 {
	color: #eaf1ff;
	margin-bottom: 1.5rem;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
	text-align: center;
}

body{
  background:radial-gradient(1200px 800px at 20% -10%,#1b2455 0%,transparent 40%),radial-gradient(1200px 800px at 120% -10%,#0b5b7a 0%,transparent 45%),linear-gradient(180deg,#08122e,#060c22);
  margin: 0;
  padding: 0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,'Helvetica Neue',Arial,'Noto Sans','Apple Color Emoji','Segoe UI Emoji';
}

.wrap{
  max-width:1200px;
  margin:0 auto;
  padding:20px;
}

#puzzle {
	display: grid;
	grid-template-columns: repeat(7, 50px);
	gap: 3px;
	margin: 20px auto;
	perspective: 1000px;
	justify-content: center;
}
.cell {
	width: 50px;
	height: 50px;
	display: flex;
	justify-content: center;
	align-items: center;
	font-weight: bold;
	font-size: 1.2rem;
	background-color: #fff;
	cursor: pointer;
	user-select: none;
	border-radius: 6px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
	transform-style: preserve-3d;
}
.cell:hover {
	transform: translateZ(10px);
	box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}
.cell.selected {
	background-color: #ffd700;
	transform: translateZ(20px) rotate(5deg);
}
.cell.found {
	background-color: #7fff7f;
	transform: translateZ(15px) rotate(-5deg);
}
/* Spelkontroll-stilar */
.game-controls {
	display: flex;
	gap: 1rem;
	justify-content: center;
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
}

/* Spelknapp-stilar */
.game-section button {
	padding: 12px 24px;
	font-size: 1rem;
	cursor: pointer;
	background-color: #5ba8ff;
	color: white;
	border: none;
	border-radius: 30px;
	transition: all 0.3s ease;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.game-section button:hover {
	background-color: #4a9eff;
	transform: translateY(-2px);
	box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.fullscreen-btn {
	background-color: #28a745 !important;
}

.fullscreen-btn:hover {
	background-color: #218838 !important;
}
#words {
	margin-top: 20px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}
.word {
	padding: 8px 16px;
	border: 2px solid #1e3a8a;
	border-radius: 20px;
	transition: all 0.3s ease;
	background-color: #1e3a8a;
	color: white;
}
.word.found {
	background-color: #7fff7f;
	border-color: #4caf50;
	text-decoration: line-through;
	transform: scale(0.95);
}
@keyframes celebrate {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-20px);
	}
}

/* Tidtakar-stilar */
.timer {
	font-size: 1rem;
	font-weight: bold;
	text-align: center;
	margin: 0.5rem 0;
	padding: 0.3rem 0.8rem;
	background-color: rgba(255, 255, 255, 0.9);
	border-radius: 10px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	color: #4CAF50;
	transition: all 0.3s ease;
	display: inline-block;
}

/* Game Over-overlay */
#gameOverOverlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.8);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
	animation: fadeIn 0.3s ease;
}

.game-over-content {
	background-color: white;
	padding: 2rem;
	border-radius: 20px;
	text-align: center;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
	animation: slideIn 0.3s ease;
	max-width: 400px;
	margin: 1rem;
}

.game-over-content h2 {
	color: #e74c3c;
	margin-bottom: 1rem;
	font-size: 2rem;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.game-over-content p {
	font-size: 1.2rem;
	margin-bottom: 1.5rem;
	color: #333;
}

.game-over-content .btn {
	background-color: #5ba8ff;
	color: white;
	border: none;
	padding: 12px 24px;
	font-size: 1rem;
	border-radius: 30px;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.game-over-content .btn:hover {
	background-color: #4a9eff;
	transform: translateY(-2px);
	box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes slideIn {
	from { 
		transform: translateY(-50px);
		opacity: 0;
	}
	to { 
		transform: translateY(0);
		opacity: 1;
	}
}

/* Sigersoverlay */
#victoryOverlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.8);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
	animation: fadeIn 0.3s ease;
}

.victory-content {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 2rem;
	border-radius: 20px;
	text-align: center;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
	animation: slideIn 0.3s ease;
	max-width: 400px;
	margin: 1rem;
}

.victory-content h2 {
	margin-bottom: 1rem;
	font-size: 2rem;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.victory-content p {
	font-size: 1.2rem;
	margin-bottom: 1.5rem;
	opacity: 0.9;
}

.victory-content .btn {
	background-color: rgba(255, 255, 255, 0.2);
	color: white;
	border: 2px solid white;
	padding: 12px 24px;
	font-size: 1rem;
	border-radius: 30px;
	cursor: pointer;
	transition: all 0.3s ease;
	backdrop-filter: blur(10px);
}

.victory-content .btn:hover {
	background-color: rgba(255, 255, 255, 0.3);
	transform: translateY(-2px);
	box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

.description-container {
  max-width: 800px;
  margin: 2rem auto;
}

.panel {
  background: rgba(18, 24, 55, 0.8);
  border: 1px solid #2a3366;
  border-radius: 16px;
  padding: 1.5rem;
  color: #e8f1ff;
}

.panel h2 {
  margin-top: 0;
  color: #6ae5a9;
}

.panel p {
  line-height: 1.6;
  color: #a7b4d6;
}

.topbar {
  text-align: center;
  margin-bottom: 2rem;
}

.badge {
  background: linear-gradient(90deg, #6ae5a9, #4ecbff);
  color: #051225;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 14px;
  margin-left: 8px;
}
